#include "MessageSendTask.h"
#include "../../../core/events/MessageCallbackEvent.h"
#include "../../../core/Impp.h"

namespace Impp
{

MessageSendTask::MessageSendTask(Oscar* oscar, Buddy* buddy, qword cookie, ActionId id) :
	Task(TASK_MESSAGE_SEND ,oscar,TASK_HANDLE_COOKIE,cookie,10),buddy(buddy),id(id)
{
}

MessageSendTask::~MessageSendTask()
{
}

void MessageSendTask::timedOut(){
	Impp::exemplar()->processMessageSendCallback(id, buddy,MESSAGE_STATE_FAILED,MESSAGE_ERROR_OTHER,wxT("There was no Replay from the Server, probably Message Sent failed!"));
}

Buddy* MessageSendTask::getBuddy(){
	return buddy;
}

ActionId MessageSendTask::getId(){
	return id;
}

}
